﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucAdvertiseAddUpdate.ascx.cs" Inherits="MyWeb.Admin.Usercontrols.ucAdvertiseAddUpdate" %>
<div id="page-content">
    <div id="page-header">
        <h1>
            <asp:Label ID="lblPageHeader" runat="server" Text="Chi tiết quảng cáo"></asp:Label></h1>
    </div>
    <div class="container">
        <div class="box-header">
            <asp:Label ID="lblBoxHeader" runat="server" Text="Thông tin chi tiết"></asp:Label>
        </div>
        <div class="box">
            <table id="myTable" class="admintable" cellspacing="1" width="100%">
                <tr>
                    <td>
                    <td colspan="2">
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" />
                    </td>
                </tr>
                <tr style="background-color: gainsboro">
                    <td colspan="2" class="key" >
                        <asp:Label ID="Label9" runat="server" Text="PHÂN LOẠI" Font-Bold="True" CssClass="auto-style4"></asp:Label>
                    <td>
                        <asp:DropDownList ID="ddlDistribution" runat="server" Width="200px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="key">
                        <asp:Label ID="Label1" runat="server" Text="Tên quảng cáo:" Font-Bold="True"></asp:Label></td>
                    <td colspan="2">
                        <asp:TextBox ID="txtName" runat="server" Width="300px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Tên nhóm không được bỏ trống" ControlToValidate="txtName" ForeColor="Red">(*)</asp:RequiredFieldValidator>
                    </td>
                </tr>

                <tr>
                    <td class="key">
                        <asp:Label ID="lblremk" runat="server" Text="Hình ảnh:" Font-Bold="True"></asp:Label></td>
                    <td colspan="2">
                        <asp:TextBox ID="txtImage" runat="server" Width="300px"></asp:TextBox>
                        <input type="button" value="..." class="button" onclick=" BrowseServer(); " />
                    </td>
                </tr>
                <tr>
                    <td class="key">
                        <asp:Label ID="lblremk0" runat="server" Text="Rộng:" Font-Bold="True"></asp:Label></td>
                    <td colspan="2">
                        <asp:TextBox ID="txtWidth" runat="server" Width="100px" TextMode="Number"></asp:TextBox>
                        <asp:Label ID="lblremk4" runat="server" Text="(px)" Font-Bold="False"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="key">
                        <asp:Label ID="lblremk1" runat="server" Text="Cao:" Font-Bold="True"></asp:Label></td>
                    <td colspan="2" >
                        <asp:TextBox ID="txtHeight" runat="server" Width="100px" TextMode="Number"></asp:TextBox>
                        <asp:Label ID="lblremk5" runat="server" Text="(px)" Font-Bold="False"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="key">
                        <asp:Label ID="lblremk2" runat="server" Text="Liên kết:" Font-Bold="True"></asp:Label></td>
                    <td colspan="2">
                        <asp:TextBox ID="txtLink" runat="server" Width="300px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="key">
                        <asp:Label ID="lblremk3" runat="server" Text="Mục tiêu:" Font-Bold="True"></asp:Label></td>
                    <td colspan="2">
                        <asp:DropDownList ID="ddlTarget" runat="server" Width="120px">
                            <asp:ListItem Value="0">_blank</asp:ListItem>
                            <asp:ListItem Value="1">_self</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="key">
                        <asp:Label ID="Label2" runat="server" Text="Vị trí:" Font-Bold="True"></asp:Label></td>
                    <td colspan="2">
                        <asp:DropDownList ID="ddlPosition" runat="server" Width="120px">
                            <asp:ListItem Value="0">Logo</asp:ListItem>
                            <asp:ListItem Value="1">SlideShow</asp:ListItem>
                            <asp:ListItem Value="2">Flash</asp:ListItem>
                            <asp:ListItem Value="3">SlideBar-Left</asp:ListItem>
                            <asp:ListItem Value="4">SlideBar-Right</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="key">
                        <asp:Label ID="Label6" runat="server" Text="Thứ tự:" Font-Bold="True"></asp:Label></td>
                    <td colspan="2">
                        <asp:TextBox ID="txtOrder" runat="server" Width="100px" TextMode="Number"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage=" Thứ tự không được bỏ trống" ControlToValidate="txtOrder" ForeColor="Red">(*)</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="key">
                        <asp:Label ID="txtCpmg" runat="server" Text="Công bố:" Font-Bold="True"></asp:Label></td>
                    <td colspan="2">
                        <asp:CheckBox ID="ckCongbo" runat="server" Checked="True" />
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <asp:Button ID="btnSave" runat="server" CssClass="button" Text="Lưu" OnClick="btnSave_Click" />
            <asp:Button ID="btnSaveAndNew" runat="server" CssClass="button" Text="Lưu & Thêm mới" OnClick="btnSaveAndNew_Click" />
            <asp:Button ID="btnCancelAdd" runat="server" CausesValidation="False" CssClass="button" Text="Đóng" OnClick="btnCancelAdd_Click" />
        </div>
    </div>
</div>
<script src="../ckfinder/ckfinder.js"></script>
<script type="text/javascript">

    function BrowseServer() {
        var finder = new CKFinder();
        finder.basePath = "ckfinder";
        finder.selectActionFunction = SetFileField;
        finder.popup();
    }

    function SetFileField(fileUrl) {
        document.getElementById('ContentPlaceHolder1_ctl00_txtImage').value = fileUrl;
    }
</script>
